package com.glory.wxelectricitypda.adapter;

import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.glory.wxelectricitypda.R;

import java.util.List;


public class LotBindAdapter extends BaseQuickAdapter<String, BaseViewHolder> {
    public LotBindAdapter(@Nullable List<String> data) {
        super(R.layout.adapter_lot_shelves, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, String s) {
        helper.setText(R.id.tvPosition,String.valueOf(helper.getAdapterPosition() + 1));
        helper.setText(R.id.tvBinLotId,s);
        helper.getView(R.id.ivDelete).setOnClickListener(view -> {
            remove(helper.getAdapterPosition());
            notifyDataSetChanged();
        });
    }
}
